Skip to content

Conversation

AlexD10S
Copy link
Contributor

@AlexD10S AlexD10S commented Aug 1, 2025

This PR converts the content from the Polkadot Africa workshop into a new tutorial for the website.
The tutorial walks developers through building a frontend dApp for an ink! smart contract using Inkathon.

  • Replaces the default Flipper contract in the Inkathon boilerplate with a custom ERC20 contract.
  • Uses the PAPI ink-sdk and ReactiveDOT under the hood for contract interactions.

@AlexD10S AlexD10S requested a review from Copilot August 6, 2025 16:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive tutorial that guides developers through building a frontend interface for ink! smart contracts using the Inkathon boilerplate. The tutorial demonstrates replacing the default Flipper contract with a custom ERC20 contract and implementing frontend interactions using PAPI ink-sdk and ReactiveDOT.

Key changes include:

  • Addition of a new "Frontend Development" category in the tutorials sidebar
  • Complete tutorial covering ERC20 contract integration, deployment, and frontend development
  • Practical code examples for querying contract storage, calling contract methods, and handling transactions

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
tutorials/sidebar.js Adds new "Frontend Development" category with the inkathon-erc20 tutorial
tutorials/frontend-development/inkathon-erc20.md Complete tutorial covering Inkathon setup, ERC20 contract integration, and frontend development
Comments suppressed due to low confidence (1)

tutorials/frontend-development/inkathon-erc20.md:66

  • The chain name should be 'Asset Hub' not 'Passet Hub'.
We’ll deploy the contract to Passet Hub

- Understand ink! and Rust at a basic level.
- Set up your development environment with the Pop CLI: [Guide](https://learn.onpop.io/welcome/install-pop-cli)
- Installed [Node.js](https://nodejs.org/en).
- [Bun](https://bun.sh/) package manage
Copy link
Preview

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word 'manage' should be 'manager' to complete the phrase 'package manager'.

Suggested change
- [Bun](https://bun.sh/) package manage
- [Bun](https://bun.sh/) package manager

Copilot uses AI. Check for mistakes.

Comment on lines +61 to +73
### 3. Deploy the ERC20 Contract on Passet Hub
:::note
If you're using an already deployed contract, you can skip this section.
:::

We’ll deploy the contract to Passet Hub
```bash
# Executed from the /contracts directory
# If `CHAIN` is not set, it will default to `dev`
CHAIN=passethub bun run deploy
```

By default, the `//Alice` account is used. If you want to use another account, put your signers `ACCOUNT_URI` in `.env.<chain>` (e.g. `.env.passethub`).
Copy link
Preview

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chain name should be 'Asset Hub' not 'Passet Hub'.

Suggested change
### 3. Deploy the ERC20 Contract on Passet Hub
:::note
If you're using an already deployed contract, you can skip this section.
:::
We’ll deploy the contract to Passet Hub
```bash
# Executed from the /contracts directory
# If `CHAIN` is not set, it will default to `dev`
CHAIN=passethub bun run deploy
```
By default, the `//Alice` account is used. If you want to use another account, put your signers `ACCOUNT_URI` in `.env.<chain>` (e.g. `.env.passethub`).
### 3. Deploy the ERC20 Contract on Asset Hub
:::note
If you're using an already deployed contract, you can skip this section.
:::
We’ll deploy the contract to Asset Hub
```bash
# Executed from the /contracts directory
# If `CHAIN` is not set, it will default to `dev`
CHAIN=assethub bun run deploy

By default, the //Alice account is used. If you want to use another account, put your signers ACCOUNT_URI in .env.<chain> (e.g. .env.assethub).

Copilot uses AI. Check for mistakes.

Comment on lines +61 to +88
### 3. Deploy the ERC20 Contract on Passet Hub
:::note
If you're using an already deployed contract, you can skip this section.
:::

We’ll deploy the contract to Passet Hub
```bash
# Executed from the /contracts directory
# If `CHAIN` is not set, it will default to `dev`
CHAIN=passethub bun run deploy
```

By default, the `//Alice` account is used. If you want to use another account, put your signers `ACCOUNT_URI` in `.env.<chain>` (e.g. `.env.passethub`).

:::info
Use the [Passet Hub Faucet](https://faucet.polkadot.io/?parachain=1111) to fund your account with test tokens.
:::

Successful deployment will look like:
```bash
$ bun run scripts/deploy.ts

✔ Initialized chain 'passethub' with account '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'

⠇ Deploying contract…WS halt (3)
✔ 📜 Deployed contract 'erc20' at address '5EnYcjJg88Ccg5Fco4L5zFR3r9QtFKknqbW9uubqbNXEgkbr' (0x7861ab0f2b73aceb7fbf661585caeff7dbad7140)

✔ Exported deployment info to file 'deployments/erc20/passethub.ts'
Copy link
Preview

Copilot AI Aug 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chain name should be 'Asset Hub' not 'Passet Hub'.

Suggested change
### 3. Deploy the ERC20 Contract on Passet Hub
:::note
If you're using an already deployed contract, you can skip this section.
:::
We’ll deploy the contract to Passet Hub
```bash
# Executed from the /contracts directory
# If `CHAIN` is not set, it will default to `dev`
CHAIN=passethub bun run deploy
```
By default, the `//Alice` account is used. If you want to use another account, put your signers `ACCOUNT_URI` in `.env.<chain>` (e.g. `.env.passethub`).
:::info
Use the [Passet Hub Faucet](https://faucet.polkadot.io/?parachain=1111) to fund your account with test tokens.
:::
Successful deployment will look like:
```bash
$ bun run scripts/deploy.ts
✔ Initialized chain 'passethub' with account '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'
⠇ Deploying contract…WS halt (3)
✔ 📜 Deployed contract 'erc20' at address '5EnYcjJg88Ccg5Fco4L5zFR3r9QtFKknqbW9uubqbNXEgkbr' (0x7861ab0f2b73aceb7fbf661585caeff7dbad7140)
✔ Exported deployment info to file 'deployments/erc20/passethub.ts'
### 3. Deploy the ERC20 Contract on Asset Hub
:::note
If you're using an already deployed contract, you can skip this section.
:::
We’ll deploy the contract to Asset Hub
```bash
# Executed from the /contracts directory
# If `CHAIN` is not set, it will default to `dev`
CHAIN=assethub bun run deploy

By default, the //Alice account is used. If you want to use another account, put your signers ACCOUNT_URI in .env.<chain> (e.g. .env.assethub).

:::info
Use the Asset Hub Faucet to fund your account with test tokens.
:::

Successful deployment will look like:

$ bun run scripts/deploy.ts

✔ Initialized chain 'assethub' with account '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY'

⠇ Deploying contract…WS halt (3)
✔ 📜 Deployed contract 'erc20' at address '5EnYcjJg88Ccg5Fco4L5zFR3r9QtFKknqbW9uubqbNXEgkbr' (0x7861ab0f2b73aceb7fbf661585caeff7dbad7140)

✔ Exported deployment info to file 'deployments/erc20/assethub.ts'

Copilot uses AI. Check for mistakes.

@AlexD10S AlexD10S merged commit 4f38bf7 into master Aug 8, 2025
3 checks passed
@AlexD10S AlexD10S deleted the alex/frontend-tutorial branch August 8, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant